<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<script>
    // 数字1~7对应星期几
    const dayNumber = 3;
    let dayName;
    switch (dayNumber) {
        case 1: dayName = '星期一'; break;
        case 2: dayName = '星期二'; break;
        case 3: dayName = '星期三'; break;
        case 4: dayName = '星期四'; break;
        case 5: dayName = '星期五'; break;
        case 6: dayName = '星期六'; break;
        case 7: dayName = '星期日'; break;
        default: dayName = '输入错误';
    }
    console.log(dayNumber + ' 对应: ' + dayName);
    
    // BMI指数测试
    const height = 1.75;
    const weight = 70;
    const bmi = weight / (height * height);
    let Result;
    if (bmi < 18.5) Result = '过轻';
    else if (bmi < 23) Result = '正常';
    else if (bmi < 25) Result = '偏胖';
    else if (bmi < 30) Result = '肥胖';
    else if (bmi < 40) Result = '重度肥胖';
    else Result = '极度肥胖';
    console.log('BMI: ' + bmi.toFixed(1) + ' (' + Result + ')');
    
    // 银行定期储蓄本息计算
    const depositAmount = 1000;
    const depositTerm = 3;
    let interestRate;
    switch (depositTerm) {
        case 1: interestRate = 0.0225; break;
        case 2: interestRate = 0.027; break;
        case 3: interestRate = 0.0325; break;
        case 5: interestRate = 0.036; break;
        default: interestRate = 0;
    }
    const totalAmount = depositAmount + depositAmount * interestRate * depositTerm;
    console.log('本息总额: ' + totalAmount.toFixed(2) + '元');
    
    // 使用三种循环输出1-100 (只展示for循环)
    console.log('for循环:');
    for (let i = 1; i <= 100; i++) console.log(i);
</script>
</body>
</html>